package com.gaga.crm.service;

import com.gaga.crm.pojo.SysUser;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

public interface UserService {

    SysUser login(String usrName, String usrPassword);

    void saveUser(SysUser user);//适用新增和修改

    void deleteUser(Long usrId);

    SysUser getUser(Long usrId);

    //按条件进行分页查询(动态 SQL)
    Page<SysUser> findUsers(String usrName, Long roleId, Pageable pageable);

    //根据用户名查询用户
    SysUser getUserByUsrName(String usrName);

    //加密方法
    String encryptPassword(Object plaintextPassword);
}
